.autoflow-node {
  max-width: 350px;
  min-width: 250px;
  border-radius: 10px;
  background-color: var(--color-bg-3);
  border: 2px solid var(--color-border-2);
  color: var(--color-text-1);

  &:hover {
    .node-toolbar {
      opacity: 1;
      transition-delay: 0s;
    }
  }


  :deep(.arco-form-item) {
    margin-bottom: 7px;
  }

}

.node-duration {
  position: absolute;
  bottom: -22px;
  right: 0;
  display: flex;
  align-items: center;

  :deep(.arco-tag) {
    color: rgba(var(--primary-6));
    background-color: transparent;
  }

  :deep(.arco-tag-icon) {
    color: rgba(var(--primary-6));
  }
}

.node-status-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 18px;
  z-index: 9;

  .node-status-success {
    color: rgb(var(--green-8))
  }

  .node-status-error {
    color: rgb(var(--orange-6))
  }
}

.node-avatar {
  //background: linear-gradient(rgb(242, 242, 255) 0%, rgba(0, 0, 0, 0.02) 100%);
  padding: 6px;
  display: flex;
  position: relative;
  align-items: center;
  border-radius: 10px;

  .node-label {
    flex: 1;
    font-size: 12px;
    font-weight: bold;
    margin: auto;
    padding: 0 10px;
    word-wrap: break-word;
    word-break: break-all; /* 长单词自动换行 */
    white-space: normal; /* 允许换行 */
    overflow-wrap: break-word; /* 适应现代浏览器 */
  }
}

.service-node-form {
  padding: 10px 10px 0 10px;
  background-color: rgba(var(--color-bg-3), 0.02);
}


.selected {
  .autoflow-node {
    box-shadow:  0 4px 6px -1px rgba(var(--primary-6), 0.2),
          0 2px 4px -2px rgba(var(--primary-6), 0.2);
    border: 2px solid rgba(var(--primary-6), 0.5) ;
  }

  .node-toolbar {
    display: block;
  }
}

.toolbar-btn {
  font-size: 14px;
}

.node-toolbar:has(.arco-dropdown-open) {
  opacity: 1;
}

.node-toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 99;
  transition: 0.5s;
  opacity: 0;

  .toolbar-menu-more {
    font-size: 20px;
  }

  &:hover {
    cursor: pointer;
  }

  .toolbar-delete-btn {
    &:hover {
      color: rgb(var(--danger-6));
    }
  }

}

.dropdown-box {
  padding: 0 5px 3px 5px;

  .dropdown-box-operator-item {
    padding: 5px 10px;
    margin-top: 5px;
    border-radius: 5px;
    color: var(--color-text-1);

    &:hover {
      cursor: pointer;
      background-color: var(--color-fill-2)
    }
  }

  .remove-btn {
    color: rgb(var(--red-6));

    &:hover {
      background-color: rgba(var(--red-6), .1);
    }
  }
}

.vue-flow__node-SERVICE {
  .vue-flow__handle {
    height: 10px;
    width: 10px;
    z-index: 10;
  }

  .vue-flow__handle-left {
    height: 15px;
    width: 6px;
    left: 1px;
    border-radius: unset;
  }

  .vue-flow__handle-right {
    background: white;
    border: 2px solid var(--vf-handle);
    right: 0;
  }
}
